package com.example.sportjava.dao;

import com.example.sportjava.bean.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserDao {
     public User getUserByMassage(@Param("username") String username, @Param("password") String password);
     public List<User> getAllUser(@Param("username") String username, @Param("pageNum") int pageNum, @Param("pageSize") int pageSize);
     public int getUserCounts(@Param("username") String username);
     public int updateState(Integer id ,Boolean state);
     public int addUser(User user);
     public int deleteUser(int id);
     public User getUpdateUser(int id);// 获取修改用户的原本信息
     public int editUser(User user);// 修改用户
     public int changeUserRole(User user);

}
